Skip to content

feat: show bar indicators to statistics dashboard - #5175

Draft
pencilheart wants to merge 6 commits into
teslamate-org:mainfrom
pencilheart:main
Draft

feat: show bar indicators to statistics dashboard#5175
pencilheart wants to merge 6 commits into
teslamate-org:mainfrom
pencilheart:main

Conversation

@pencilheart

Copy link
Copy Markdown
Xnip2026-03-04_23-04-48

Hi TeslaMate team,

I’d like to propose a Grafana dashboard focused on daily statistics (“Day Trips”). The goal is to provide a clear per-day aggregation view of driving sessions, so users can quickly compare different days without drilling into individual trip details.

What it shows (daily level):
• Start/End time of the day’s trip records
• Total distance and duration
• Average speed and outside temperature
• Energy consumed (gross)
• Net consumption (Wh/km) and net efficiency
• Gross consumption (Wh/km) and gross efficiency
(With bar-style visuals to make day-to-day comparison easy.)

Why this is useful:
Many users primarily want a day-by-day overview (daily routine tracking, commuting analysis, high-consumption days, seasonal temperature impact, etc.). A dedicated daily dashboard makes it much easier to spot trends and outliers than browsing individual trips.

If your team finds this useful, I’d really appreciate it if you could review it and share any feedback or suggestions for improvement.

Thanks!

@CLAassistant

CLAassistant commented Mar 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@netlify

netlify Bot commented Mar 4, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 78b565b
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/69b02583f935cd0008d0b017
😎 Deploy Preview https://deploy-preview-5175--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@DrMichael

Copy link
Copy Markdown
Collaborator

Well, we have the Statistics dashboard with a daily view. Looks quite similar. It might be better to integrate the changes into that? (I like the coloured bars...)

@pencilheart

Copy link
Copy Markdown
Author

Well, we have the Statistics dashboard with a daily view. Looks quite similar. It might be better to integrate the changes into that? (I like the coloured bars...)

Oh, my bad. Statistics dashboard is great (Forgive me miss it before). It is true that the two conflicted.

If integration is needed, I will do it.

@swiffer

swiffer commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

hi @pencilheart - thanks for your contribution - how is that different from looking at the statistics dashboard with setting the period to day?

@swiffer

swiffer commented Mar 7, 2026

Copy link
Copy Markdown
Collaborator

sorry, somehow missed the reply by DrMichael - integration would be needed, yes

agree that having a bar for distance would be great. as energy used most likely correlates i wouldn't add a graph for that considering the space available.

@pencilheart - do you want to to update this PR ?

@swiffer
swiffer marked this pull request as draft March 7, 2026 08:38
@swiffer swiffer added the area:dashboard Related to a Grafana dashboard label Mar 7, 2026
@swiffer swiffer added this to the v3.1.0 milestone Mar 7, 2026
@pencilheart

Copy link
Copy Markdown
Author

@swiffer Alright, I'll update it.

@pencilheart

Copy link
Copy Markdown
Author

Before:
Xnip2026-03-10_22-00-11

After:
Xnip2026-03-10_21-59-07

@pencilheart
pencilheart marked this pull request as ready for review March 10, 2026 14:08
@DrMichael

Copy link
Copy Markdown
Collaborator

Ah, then please also for "Driving Efficiency" :-)

Perhaps narrow some columns also... So all fit better on one screen.

@swiffer

swiffer commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

i would keep driving efficiency as is (same visuals are used in Drives and Efficiency Dashboards)

@DrMichael

Copy link
Copy Markdown
Collaborator

i would keep driving efficiency as is (same visuals are used in Drives and Efficiency Dashboards)

Well, then let's make it consistent and the bar for distance same style as with driving efficiency. (Although the other style looks better to me.)

@JakobLichterfeld JakobLichterfeld modified the milestones: v3.1.0, v3.0.1 Mar 14, 2026
@DrMichael

Copy link
Copy Markdown
Collaborator

i would keep driving efficiency as is (same visuals are used in Drives and Efficiency Dashboards)

Valid point. What about changing all efficiency displays to gradient? I played around a bit:
image
image
image
image

Opinions?

@swiffer

swiffer commented Mar 18, 2026

Copy link
Copy Markdown
Collaborator

Not really - personally like the retro style and the color palette being a little less "poppy" - but open changing it if others like it more

@JakobLichterfeld JakobLichterfeld changed the title Add “Day Trips” Dashboard feat: add “Day Trips” Dashboard Mar 22, 2026
@JakobLichterfeld JakobLichterfeld added the enhancement New feature or request label May 2, 2026
@JakobLichterfeld

Copy link
Copy Markdown
Member

Is the only thing missing the screenshot and link in README according to https://docs.teslamate.org/docs/development#making-changes-to-grafana-dashboards?

@JakobLichterfeld

Copy link
Copy Markdown
Member

I would really love to include it in next release. @pencilheart may I ask you to add the screenshot and link in README?

@netlify

netlify Bot commented Jun 13, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 5a1a6e9
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/6a2cb69c4ab9fe0008edb483
😎 Deploy Preview https://deploy-preview-5175--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pencilheart

Copy link
Copy Markdown
Author

@JakobLichterfeld Done!

@JakobLichterfeld JakobLichterfeld changed the title feat: add “Day Trips” Dashboard feat: add “Day Trips” to statistics dashboard Jun 13, 2026
@JakobLichterfeld
JakobLichterfeld requested a review from swiffer June 13, 2026 17:30
@JakobLichterfeld JakobLichterfeld changed the title feat: add “Day Trips” to statistics dashboard feat: show bar indicators to statistics dashboard Jun 13, 2026
@JakobLichterfeld JakobLichterfeld modified the milestones: v4.1.0, v4.2.0 Aug 13, 2026

@JakobLichterfeld JakobLichterfeld left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi hanheihei, thanks for the contribution and the nice idea — bar indicators make the distance column much easier to scan! 🙏

A few points before we can merge:

  1. Hardcoded max: 400 saturates the gauge for longer periods. This table aggregates per $period (day/week/month/year). With month or year selected, virtually every row exceeds 400 km, so all bars are pegged at 100 % and the comparison the bars are meant to enable no longer works. Please drop the max and min overrides entirely — Grafana then auto-scales the gauge to the data range of the current query, which works for every period.

  2. km and mi overrides should be identical. The sum_distance_km override sets "valueDisplayMode": "text" and "decimals": 0, while the sum_distance_mi override has neither — users with miles configured would get a visibly different (and unrounded) rendering. Please apply the same cell options to both. (With max removed, the "same 400 for km and mi" scale mismatch goes away as well.)

  3. Minor: the PR description talks about a new "Day Trips" dashboard, but the diff modifies the existing Statistics dashboard. Could you update the description to match the actual change?

Once the overrides are cleaned up, please also regenerate the screenshot so README/website show the final look.

Thanks again — looking forward to the update!

🤖 Review drafted with Claude Code (Fable 5 high) — sponsored by Claude for Open Source

@JakobLichterfeld
JakobLichterfeld marked this pull request as draft August 13, 2026 09:00
@JakobLichterfeld JakobLichterfeld modified the milestones: v4.2.0, v4.3.0 Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dashboard Related to a Grafana dashboard enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants